package com.yq.bootrabbitmq.service.impl;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @ClassName ReceiveSeriveImpl
 * @Description TODO
 * @Author yaoqiang
 * @Date 2021/11/1 17:37
 * @Version 1.0
 */
@Service
public class ReceiveSeriveImpl {

    @RabbitListener(queues = "myQueueDirect")
    public void directReceive(String message) {
        System.out.println(message);
    }
    @RabbitListener(queues = "fanoutQueue")
    public void fanoutReceive(String message){
        System.out.println(message);
    }
    @RabbitListener(queues = "topicQueue")
    public void topicReceive(String message){
        System.out.println(111+message);
    }

    @RabbitListener(queues = "topicQueue2")
    public void topicReceive2(String message){
        System.out.println(222+message);
    }

}
